package Book;

public class Book {
    private String name;
    private String author;
    private int price;
    private String kind;

    public void setState(boolean state) {
        this.state = state;
    }

    public boolean isState() {
        return state;
    }

    private boolean state;

    public Book(String name, String author, int price, String kind) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.kind = kind;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", kind='" + kind + '\'' +
                ", state=" + ((this.state==true)?" 已借出":" 未借出") +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }
}
